package com.ruoyi.zsyh.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.IdWorker;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zsyh.mapper.ZsyhFactoryPayrelMapper;
import com.ruoyi.zsyh.domain.ZsyhFactoryPayrel;
import com.ruoyi.zsyh.service.IZsyhFactoryPayrelService;
import com.ruoyi.common.core.text.Convert;

/**
 * 厂家服务费付款记录Service业务层处理
 * 
 * @author yuexl
 * @date 2021-12-24
 */
@Service
public class ZsyhFactoryPayrelServiceImpl implements IZsyhFactoryPayrelService 
{
    @Autowired
    private ZsyhFactoryPayrelMapper zsyhFactoryPayrelMapper;

    /**
     * 查询厂家服务费付款记录
     * 
     * @param id 厂家服务费付款记录ID
     * @return 厂家服务费付款记录
     */
    @Override
    public ZsyhFactoryPayrel selectZsyhFactoryPayrelById(String id)
    {
        return zsyhFactoryPayrelMapper.selectZsyhFactoryPayrelById(id);
    }

    /**
     * 查询厂家服务费付款记录列表
     * 
     * @param zsyhFactoryPayrel 厂家服务费付款记录
     * @return 厂家服务费付款记录
     */
    @Override
    public List<ZsyhFactoryPayrel> selectZsyhFactoryPayrelList(ZsyhFactoryPayrel zsyhFactoryPayrel)
    {
        return zsyhFactoryPayrelMapper.selectZsyhFactoryPayrelList(zsyhFactoryPayrel);
    }

    /**
     * 新增厂家服务费付款记录
     * 
     * @param zsyhFactoryPayrel 厂家服务费付款记录
     * @return 结果
     */
    @Override
    public int insertZsyhFactoryPayrel(ZsyhFactoryPayrel zsyhFactoryPayrel)
    {
        zsyhFactoryPayrel.setId(IdWorker.getId());
        zsyhFactoryPayrel.setCreateTime(DateUtils.getNowDate());
        return zsyhFactoryPayrelMapper.insertZsyhFactoryPayrel(zsyhFactoryPayrel);
    }

    /**
     * 修改厂家服务费付款记录
     * 
     * @param zsyhFactoryPayrel 厂家服务费付款记录
     * @return 结果
     */
    @Override
    public int updateZsyhFactoryPayrel(ZsyhFactoryPayrel zsyhFactoryPayrel)
    {
        return zsyhFactoryPayrelMapper.updateZsyhFactoryPayrel(zsyhFactoryPayrel);
    }

    /**
     * 删除厂家服务费付款记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteZsyhFactoryPayrelByIds(String ids)
    {
        return zsyhFactoryPayrelMapper.deleteZsyhFactoryPayrelByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除厂家服务费付款记录信息
     * 
     * @param id 厂家服务费付款记录ID
     * @return 结果
     */
    @Override
    public int deleteZsyhFactoryPayrelById(String id)
    {
        return zsyhFactoryPayrelMapper.deleteZsyhFactoryPayrelById(id);
    }
}
